import Vue from 'vue'
import Vuex from 'vuex'
import storage from "@/utils/storage";
Vue.use(Vuex) // vue的插件机制

// Vuex.Store 构造器选项
const store = new Vuex.Store({
    state: {
        appVersion: '1.0.0',
		hasLogin: storage.getHasLogin(),
		userInfo: storage.getUserInfo(),
		uuid: storage.getUuid(),
		token: "",
    },
	mutations: {
		setUserInfo(state, userInfo){
			state.userInfo = userInfo;
		},
	},
	getters:{
		getAppVersion(state){
			return state.appVersion;
		},
	},
	actions: {
		
	}
})

export default store
